* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

.auth-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-align: center;
    padding: 40px 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

.auth-form {
    padding: 40px 30px;
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.auth-form h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #999;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 20px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #667eea;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
    transition: color 0.3s ease;
}

.checkbox-label:hover {
    color: #333;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    background: transparent;
}

.checkbox-label:hover .checkmark {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: scale(1);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.checkbox-label input[type="checkbox"]:checked:hover + .checkmark {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    color: white;
    font-size: 11px;
    font-weight: bold;
    opacity: 1;
    transition: all 0.2s ease;
}

.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 11px;
    font-weight: bold;
    opacity: 0;
    transition: all 0.2s ease;
}

.password-strength {
    margin-bottom: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.password-strength.show {
    opacity: 1;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e1e5e9;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 25%;
    background: #ff4757;
}

.strength-fill.fair {
    width: 50%;
    background: #ffa502;
}

.strength-fill.good {
    width: 75%;
    background: #2ed573;
}

.strength-fill.strong {
    width: 100%;
    background: #5352ed;
}

.strength-text {
    font-size: 12px;
    color: #666;
}

.auth-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-btn.primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e1e5e9;
}

.auth-footer p {
    color: #666;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    display: none;
}

.loading-spinner {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.loading-spinner i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 15px;
}

.loading-spinner p {
    color: #666;
    font-size: 14px;
}

/* 通知系统 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid;
    animation: slideInRight 0.4s ease-out;
    max-width: 350px;
    word-wrap: break-word;
}

.notification.success {
    border-left-color: #2ed573;
    background: #f0fff4;
}

.notification.error {
    border-left-color: #ff4757;
    background: #fff5f5;
}

.notification.warning {
    border-left-color: #ffa502;
    background: #fffaf0;
}

.notification.info {
    border-left-color: #5352ed;
    background: #f0f0ff;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 1.2rem;
}

.notification.success .notification-icon {
    color: #2ed573;
}

.notification.error .notification-icon {
    color: #ff4757;
}

.notification.warning .notification-icon {
    color: #ffa502;
}

.notification.info .notification-icon {
    color: #5352ed;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: #666;
}

/* 动画 */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 输入验证样式 */
.input-wrapper.error input {
    border-color: #ff4757;
    background: #fff5f5;
}

.input-wrapper.success input {
    border-color: #2ed573;
    background: #f0fff4;
}

.form-error {
    color: #ff4757;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-error i {
    font-size: 10px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .auth-card {
        border-radius: 15px;
    }
    
    .auth-header {
        padding: 30px 20px;
    }
    
    .auth-form {
        padding: 30px 20px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .notification {
        max-width: calc(100vw - 40px);
    }
}

/* 个人资料页面样式 */
.profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f1f2f6;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px 8px 0 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #333;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.input-wrapper.readonly {
    background: #f8f9fa;
}

.input-wrapper.readonly input {
    background: #f8f9fa;
    color: #666;
    cursor: not-allowed;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: #1a1a1a;
        color: #e1e1e1;
    }
    
    .auth-form h2 {
        color: #e1e1e1;
    }
    
    .input-wrapper input {
        background: #2a2a2a;
        border-color: #404040;
        color: #e1e1e1;
    }
    
    .input-wrapper input:focus {
        background: #333;
    }
    
    .checkmark {
        border-color: #404040;
    }
    
    .checkbox-label:hover .checkmark {
        border-color: #667eea;
    }
    
    .checkbox-label {
        color: #ccc;
    }
    
    .checkbox-label:hover {
        color: #e1e1e1;
    }
    
    
    .auth-footer {
        border-top-color: #404040;
    }
    
    .loading-spinner {
        background: #1a1a1a;
        color: #e1e1e1;
    }
    
    .form-group label {
        color: #e1e1e1;
    }
    
    .profile-tabs {
        border-bottom-color: #404040;
    }
    
    .tab-btn {
        color: #999;
    }
    
    .tab-btn:hover {
        background: #2a2a2a;
        color: #e1e1e1;
    }
}
